import java.util.*;
import java.text.*;

public class DateTimeClass
{
 
  // java.util gets the dates and java.text formats it
  
  
  public String day()
  {
       Date dNow = new Date( );                             //initialises new date object
       SimpleDateFormat ft = new SimpleDateFormat ("dd");   //formats the date to desired complexity - e.g. "dd" means day only
       return ft.format(dNow);                              //outputs the formatted date object being "dNow" in this case
  }
  
  public String month()
  {
       Date mNow = new Date( );
       SimpleDateFormat ft = new SimpleDateFormat ("MM");
       return ft.format(mNow);
  }
  
  public String year()
  {
       Date yNow = new Date( );
       SimpleDateFormat ft = new SimpleDateFormat ("yyyy");
       return ft.format(yNow);
  }
  
  public String hour()
  {
       Date hNow = new Date( );
       SimpleDateFormat ft = new SimpleDateFormat ("H");
       return ft.format(hNow);
  }
  
  public String minute()
  {
       Date minNow = new Date( );
       SimpleDateFormat ft = new SimpleDateFormat ("m");
       return ft.format(minNow) ;   
  }
}